package com.bt.controller.admin;

import com.bt.entity.YddAdvpos;
import com.bt.result.Result;
import com.bt.service.YddAdvposService;
import com.bt.vo.YddAdvposVO;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description TODO
 * @Author itheima
 * @Date 2023-05-02 18:27
 */
@Slf4j
@RestController
@RequestMapping("/ydd_advpos")
public class YddAdvposController {
    @Autowired
    private YddAdvposService yddAdvposService;

    /**
     * 查询广告位列表全部
     * @return
     */
    @ApiOperation("查询广告位列表全部接口")
    @GetMapping("/all")
    public Result all(){
        log.info("查询广告位列表全部");
      List<YddAdvposVO> yddAdvposVOList =  yddAdvposService.all();
       return Result.success(yddAdvposVOList);
    }
}
